package com.fasteat.menu.util;

/**
 * @author run
 * @since 2021/3/9 19:01
 */
public class NumberUtil {

    //是否处于范围内
    public static boolean isInRange(Integer num, int lower, int upper){
        if (num == null){
            return false;
        }
        return isInRange(num.intValue(),lower,upper);
    }

    public static boolean isInRange(int num, int lower, int upper){
        if (num < lower || num > upper){
            return false;
        }
        return true;
    }
}
